package com.example.dal.mapper;

import com.example.dal.entity.DemoAuthor;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface DemoAuthorMapper {

	@Insert({"insert into"," demo_author", "(","name,gmt_create,gmt_modified",")",
			"values","(",
			"#{name}, #{createTime}, #{modifiedTime}",
			")"
	})
    int insert(DemoAuthor record);

    @Select({"select id,name from demo_author  where name=#{name} " })
    List<DemoAuthor> selectByName(String name);

}